
<head>
	<script>
  
	function changedb(id){
		if(!id || id=="")return;
		$.post(contextUrl+'/opt/base/db/getAllTables.ajax',{id:id},function(data){ 
		var $tableList = $("#tableList").empty();
	 		$.each(data,function(i,v){
	 			$tableList.append("<option value='"+ v +"'>"+ v +"</option>");
	 		});
	 	
	 	},'json');
	}
	
	$(function(){
		 getDbList("#dbList");
	
	});
	</script>
</head>
<body style="height:100%"> 
	<table width=99.8% border="1" heihgt="100%">
		<tr>
			<td width="180" valign="top">
					<div><select id="dbList" style="width:100%;"  onchange="changedb(this.value)"></select> </div>
				<select id="tableList" size="35" style="width:100%;"></select>
			</td>
			<td>
			<div>
			
			</div>
			<div>
				<textarea id="result" style="width:100%;height:100%;min-height:500px;">
					
				</textarea>
			</div>
			</td>
		</tr>
	</table> 
</body>